package com.ostrich.cloud.ostrichGoodsService.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ostrich.cloud.ostrichGoodsSercice.model.Dto.SecKillDto;
import com.ostrich.cloud.ostrichGoodsSercice.model.param.SnappedGoodParam;
import com.ostrich.cloud.ostrichGoodsService.infra.model.SecKill;
import com.ostrich.cloud.ostrichGoodsService.infra.model.SecKillOrder;

import java.util.List;

/**
 * <p>
 * 秒杀表 服务类
 * </p>
 *
 * @author Lucas
 * @since 2022-10-31
 */
public interface SecKillService extends IService<SecKill> {

    SecKill addSecKill(SecKill secKill) throws Exception;

    List<SecKillDto> getSecKill(String status);

    void snappedGood(SnappedGoodParam snappedGoodParam, Integer parentId);
    void addSecKillOrder(SecKillOrder sec,Integer locationId);

    SecKillDto getSecKillResult(Integer parentId,Integer secId);

    void cancelSecKill(Integer parentId, Integer orderId) throws Exception;


}
